<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"      
      xmlns:rich="http://richfaces.org/rich">
    <ui:composition template="/templates/templateMenu.xhtml">
        <ui:param name="onload" value="setFocus()"/>
        <ui:define name="body">
            <h:form id="mainForm">
                <rich:separator width="100%" height="2"/>
                <rich:spacer width="100%" height="12"/>
                <rich:panel header="#{tituloPainelPrincipal}" width="100%">
                    <h:panelGrid columns="#{numColFiltro}">
                        <ui:insert name="filtrosExtras" />
                        
                       <h:commandButton value="#{msgs.botaoPesquisar}" action="#{mBean.pesquisar}" reRender="tab,datascroller" />
                    </h:panelGrid>
                </rich:panel>
                <rich:toolBar rendered="#{ExibirBarraBotoes}" >
                    <rich:toolBarGroup location="right" >
                        <a4j:commandLink  action="#{mBean.inserir}"  >
                            <h:graphicImage  style="border: none;" url="/imagens/white.png" alt="Incluir"/>
                            <h:outputText  value="#{msgs.botaoIncluir}" />
                        </a4j:commandLink>
                    </rich:toolBarGroup>
                </rich:toolBar>
                <h:panelGrid styleClass="panel_tabela">

                    <rich:dataTable id="tab" value="#{mBean.lista}" var="lista"
                                    rows="15" styleClass = "tabelaGeral"
                                    rowClasses ="linhaPar, linhaImpar"
                                    frame="box" >

                        <ui:insert name="colunasExtras" />

                    </rich:dataTable>
                    <rich:datascroller id="datascroller" align="left" for="tab" binding="#{mBean.scroll}"/>
                </h:panelGrid>
            </h:form>
            <ui:insert name="modal" />
        </ui:define>
    </ui:composition>
</html>
